<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>部门管理</title>
    <%@ include file="common.jsp"%>
    <script type="text/javascript" src="/static/js/department.js"></script>
</head>
<body>
    <table id="dept_datagrid"></table>

    <div id="dept_toolbar">
        <a class="easyui-linkbutton" iconCls="icon-add" data-method="add" plain="true">新增</a>
        <a class="easyui-linkbutton" iconCls="icon-edit" data-method="edit" plain="true">编辑</a>
        <a id="btn_state" class="easyui-linkbutton" iconCls="icon-remove" data-method="changeState" plain="true">停用</a>
        <a class="easyui-linkbutton" iconCls="icon-reload" plain="true" data-method="reload">刷新</a>
    </div>


    <div id="dept_dialog" style="margin-top: 15px">
        <form method="post" id="dept_form">
            <input type="hidden" name="id" id="deptId">
            <table align="center">
                <tr>
                    <td>部门名称</td>
                    <td><input class="easyui-textbox" name="name"
                               validType="remote['/department/validateByName.do?id='+deptId.value,'name']"
                               invalidMessage="用部门已存在"/></td>
                </tr>
                <tr>
                    <td>部门编号</td>
                    <td><input class="easyui-textbox" name="sn"/></td>
                </tr>
            </table>
        </form>
    </div>
</body>
</html>
